package com.project.client.service.impl;

import com.project.client.domain.MessageEntity;
import com.project.client.mapper.MessageMapper;
import com.project.client.service.MessageService;
import com.project.common.service.BaseServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

/**
 * 温度记录数据Service业务层处理
 *
 * @author project
 * @date 2021-05-10
 */
@Service
public class MessageServiceImpl extends BaseServiceImpl<MessageMapper, MessageEntity> implements MessageService {

    @Override
    public MessageEntity selectById(Long id) {
        return baseDao.selectById(id);
    }

    @Override
    public List<MessageEntity> selectList(MessageEntity entity) {
        return baseDao.list(entity);
    }

    @Override
    public int save(MessageEntity entity) {
        int count = baseDao.insert(entity);
        return count;
    }

    @Override
    public int update(MessageEntity entity) {
        int count = baseDao.updateById(entity);
        return count;
    }

    @Override
    public int delete(Long[] ids) {
        int count = baseDao.upDelete(ids);
        return count;
    }
}
